.TH std::locale::facet 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::locale::facet \- std::locale::facet

.SH Synopsis
   Defined in header <locale>
   class locale::facet;

   std::locale::facet is the base class for facets. It provides a common base class so
   that locales could store pointers to the facets they implement in a single indexed
   container, and it abstracts support for facet reference counting.

   Whenever a facet is added to a locale, the locale increments the reference count in
   the facet (through an implementation-specific mechanism). Whenever a locale is
   destructed or modified, it decrements the reference count in each facet it no longer
   implements. Whenever a facet's reference count becomes zero, the locale performs
   delete static_cast<std::locale::facet*>(f); where f is the pointer to the facet.

.SH Member functions

   constructor   constructs a new facet with specified reference count
                 \fI(protected member function)\fP
   operator=     the copy assignment operator is deleted
                 \fI(protected member function)\fP
   destructor    the destructor is protected virtual
   \fB[virtual]\fP     \fI(virtual protected member function)\fP

.SH Example

    This section is incomplete
    Reason: no example

   Defect reports

   The following behavior-changing defect reports were applied retroactively to
   previously published C++ standards.

      DR    Applied to            Behavior as published              Correct behavior
   LWG 2694 C++98      the definition of 'facet' was removed by    added the definition
                       the resolution of LWG issue 436             back

.SH See also

      the facet index type: each facet class must declare or inherit a public static
   id member of this type
      \fI(class)\fP

.SH Category:
     * Todo no example
